import greenfoot.*;  // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)

/**
 * Write a description of class Next here.
 * 
 * @author (your name) 
 * @version (a version number or a date)
 */
public class Next extends Button
{
    public Next(int x,int y)
    {
        super(x,y);
        setImage(new GreenfootImage("next0.png"));
    }
    
    public void act() 
    {
        super.act();
        
        if(isMouseOver())
        {
            setImage(new GreenfootImage("next1.png"));
            if(clicked())
            ((GameWorld)getWorld()).nextPage();
        }
        else
        setImage(new GreenfootImage("next0.png"));
         
    }    
}
